package com.hk.service.impl;

import com.hk.dao.NewsTypeDao;
import com.hk.model.NewsType;
import com.hk.service.INewsTypeService;

import java.util.List;

/**
 * @Author: KangWang
 * Date: 2021/5/19 17:14
 * State：新闻类型业务逻辑层
 */
public class NewsTypeServiceImpl implements INewsTypeService {
    @Override
    public List<NewsType> findAllNewsType() {
        NewsTypeDao newsTypeDao = new NewsTypeDao();
        List<NewsType> newsTypes = newsTypeDao.findAllNewsType();
        if (newsTypes != null && !newsTypes.isEmpty()) {
            System.out.println("未获取到新闻类型数据");
            return null;
        }
        return newsTypes;

    }
}
